package com.assets.room.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import com.assets.room.entity.ScrapScrapdetail;

import java.util.List;

@Dao
public interface ScrapScrapdetailDao {

    @Insert
    void insert(ScrapScrapdetail scrapScrapdetail);

    @Insert
    void insert(List<ScrapScrapdetail> scrapScrapdetail);

    @Query("SELECT * FROM t_asset_scrap_scrapdetail WHERE scrap_id = :scrap_id")
    List<ScrapScrapdetail> getDetailById(String scrap_id);

    @Query("SELECT * FROM t_asset_scrap_scrapdetail")
    List<ScrapScrapdetail> getAllData();

    @Query("DELETE FROM t_asset_scrap_scrapdetail")
    void deleteAllData();
}
